package com.diandian.backend.client.mapper;

import com.diandian.backend.client.domain.Permission;
import com.diandian.backend.client.dto.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PermissionMapper {

    // 查询详情
    Permission getDetail(@Param("data") PermissionDetailParamDTO requestDTO);

    // 查询记录数
    Integer getCount(@Param("data") ClientPermissionPageParamDTO requestDTO);

    // 查询分页中的数据集合
    List<Permission> getPage(@Param("data") ClientPermissionPageParamDTO requestDTO, @Param("pageSize") Integer pageSize, @Param("offset") Integer offset);

    void add(@Param("data") ClientPermissionAddParamDTO param);

    void updateById(@Param("data") ClientPermissionUpdateByIdParamDTO param);

    void deleteById(@Param("data") ClientPermissionDeleteByIdParamDTO param);
}